package com.example.superinbox;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.support.v4.app.NavUtils;

public class SMSPlane extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_smsplane);

		// Adding listners to the buttons at home page

		//handle back button at sms plane activity
		final Button backButton = (Button) findViewById(R.id.b_back_home);
		backButton.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				Intent intent = new Intent(getApplicationContext(), HomeActivity.class);
				startActivity(intent);
			}
		});
		
		//handle add new  plane activity
		final Button addNewButton = (Button) findViewById(R.id.b_add_new_plane);
		addNewButton.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				Intent intent = new Intent(getApplicationContext(), NewPlane.class);
				startActivity(intent);
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_smsplane, menu);
		return true;
	}

}
